Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AABB Conflict FIx #3422

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Anthony-Tafoya
Copy link
Contributor

@Anthony-Tafoya Anthony-Tafoya commented Sep 11, 2024

This PR relates to issue #3405. Credit to hoanle for finding the issue.

Background:
OccGridEstimator uses different levels of AABBs to determine where to sample the points from with varying levels of detail.

        # multiple levels of aabbs
        aabbs = torch.stack(
            [_enlarge_aabb(roi_aabb, 2**i) for i in range(levels)], dim=0
        )

But those samples outside the original AABB are not used anyway if we disable the scene contraction:

        if self.spatial_distortion is not None:
            positions = ray_samples.frustums.get_positions()
            positions = self.spatial_distortion(positions)
            positions = (positions + 2.0) / 4.0
        else:
            positions = SceneBox.get_normalized_positions(
                ray_samples.frustums.get_positions(), self.aabb
            )

Since the positions (if distortion is disabled) are taken from a normalized standpoint until the self.aabb parameter is passed in.

Problem:
The problem is that if we begin with the scene_aabb, the outermost AABB, we will not use any of the other resolutions in our enlargement calculations. Therefore, we need to start from the innermost AABB depending on the number of levels.

@jb-ye
Copy link
Collaborator

jb-ye commented Sep 18, 2024

would you want to rebase your PR?

@Anthony-Tafoya
Copy link
Contributor Author

would you want to rebase your PR?

I can rebase no worries

@Anthony-Tafoya Anthony-Tafoya force-pushed the Anthony/AABB-Conflict-With-Instant-ngp branch 2 times, most recently from a952142 to c9a8bf4 Compare September 19, 2024 22:17
@Anthony-Tafoya Anthony-Tafoya force-pushed the Anthony/AABB-Conflict-With-Instant-ngp branch from c9a8bf4 to f86dbe6 Compare September 20, 2024 00:13
@Anthony-Tafoya Anthony-Tafoya force-pushed the Anthony/AABB-Conflict-With-Instant-ngp branch 2 times, most recently from 3d14c25 to 8e400c4 Compare September 20, 2024 00:24
@Anthony-Tafoya Anthony-Tafoya force-pushed the Anthony/AABB-Conflict-With-Instant-ngp branch from 8e400c4 to 715f96e Compare September 20, 2024 00:31
@Anthony-Tafoya
Copy link
Contributor Author

I am unsure at the moment of how to test this properly, so open to thoughts. Will look at other PR's and try to create something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants